function toLog( string )
{
    console.log( string );
}

function getMousePosition()
{
    return {
                x : window.event.x,
                y : window.event.y
    };
}

function objectIsPress( x, left, right ) {
    return (
                x > left
             && x < right
            );
};

window.onload = function()
{
    document.onmousedown = function()
    {
        document.onmousemove = function()
        {
            toLog("move");
        }
        
        document.onmouseup = function()
        {
            toLog("up");
            document.onmousemove = null
            document.onmouseup = null
        }
    }
}